//package com.plian.system.controller.pf;
//
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.Tools.pagedata.PageData;
//import com.plian.system.config.Resubmit;
//import com.plian.system.entity.pf.BaseEnterpriseAnnuity;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.pf.IBaseEnterpriseAnnuityService;
//import com.plian.system.service.wf.FormWorkflowService;
//import com.plian.system.vo.pf.BaseEnterpriseAnnuityVO;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lombok.AllArgsConstructor;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.validation.Valid;
//import java.util.HashMap;
//import java.util.List;
//
///**
// * @Description: TODO
// * @Author: Take-off
// * @Date: 2023/3/13 10:44 AM
// * @Param
// * @return
// * @Version: 1.0
// **/
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/enterpriseannuity")
//@Api(value = "BaseEnterpriseAnnuityController", tags = "企业年金发放情况 控制器")
//public class BaseEnterpriseAnnuityController  extends BaseController {
//
//    private FormWorkflowService formWorkflowService;
//
//    private IBaseEnterpriseAnnuityService baseEnterpriseAnnuityService;
//
//    @PostMapping("/detail")
//    @ApiOperation(value = "详情", notes = "传入 baseEnterpriseAnnuity")
//    public R<BaseEnterpriseAnnuityVO> detail(@RequestBody BaseEnterpriseAnnuity baseEnterpriseAnnuity) {
//        return baseEnterpriseAnnuityService.getDetailObj(baseEnterpriseAnnuity);
//    }
//
//    @PostMapping("/list")
//    @ApiOperation(value = "分页", notes = "传入query")
//    public ListResult<BaseEnterpriseAnnuityVO> list(@RequestBody Query query) {
//        return baseEnterpriseAnnuityService.list(query);
//    }
//
//    @PostMapping("/submit")
//    @Resubmit(delaySeconds = 0)
//    @ApiOperation(value = "新增或修改", notes = "传入 baseBusinessAudit")
//    public R<BaseEnterpriseAnnuity> submit(@Valid @RequestBody BaseEnterpriseAnnuity baseEnterpriseAnnuity) {
//        boolean result = baseEnterpriseAnnuityService.submit(baseEnterpriseAnnuity);
//        HashMap<String, Object> processVariable = new HashMap<>();
//        formWorkflowService.startProcessAndSimulate(String.valueOf(baseEnterpriseAnnuity.getId()),baseEnterpriseAnnuity.getFormType(),processVariable);
//        return result ? R.data(baseEnterpriseAnnuity) : new R(CommonCode.FAIL);
//    }
//
//    @PostMapping("/remove")
//    @ApiOperation(value = "删除", notes = "传入 ids")
//    public R remove(@RequestBody PageData pd) {
//        List<String> ids = (List<String>)pd.get("ids");
//        return baseEnterpriseAnnuityService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA)))
//                ? new R(CommonCode.SUCCESS) : new R(CommonCode.FAIL);
//    }
//
//
//}
